<?php

namespace app\controllers;

use Yii;
use yii\web\Controller;
use yii\web\Request;
use yii\web\Response;
use proxy\HttpProxy;
use helper\SessionHelper;

class UploadcardController extends SecBaseController
{
    public function actionList(){
        $request = Yii::$app->request;
        $page_code = $request->get('page_code');
        $sort_code = $request->get('sort_code');
        $sortorder = $request->get('sortorder');
        $this->remote_params['page_code'] = $page_code;
        $this->remote_params['sort_code'] = $sort_code;
        $this->remote_params['sortorder'] = $sortorder;

        $verify_flag = $request->get('verify_flag');
        $mobile = $request->get('mobile');
        $vender_id = $request->get('vender_id');
        $begin_time = $request->get('begin_time');
        $end_time = $request->get('end_time');


        $this->remote_params['verify_flag'] = $verify_flag;
        $this->remote_params['mobile'] = $mobile;
        $this->remote_params['vender_id'] = $vender_id;
        $this->remote_params['begin_time'] = $begin_time;
        $this->remote_params['end_time'] = $end_time;


        try{ 
            $ret = $this->proxy->execute('uploadcard', 'list', $this->remote_params);
            $this->return_page_values = array_merge($this->return_page_values, $ret);
        }catch(\Exception $e){
            $this->return_page_values['errno'] = $e->getCode();
            $this->return_page_values['errmsg'] = $e->getMessage();
            return $this->myRenderFile('@tpl/page/error.tpl', $this->return_page_values);
        }

        return $this->myRenderFile('@tpl/page/uploadcard/list.tpl', $this->return_page_values);

    }

   

    
}
